package com.linktco.system.en;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zhangnx
 */

@Getter
@AllArgsConstructor
public enum DataScopeType {

    QUERY_ALL(1,"所有部门"),
    QUERY_CHILDREN(2,"部门下所有"),
    QUERY_SELF(3,"所选部门"),

    ;

    public static String getName(Integer value){
        for (DataScopeType scopeType : DataScopeType.values()) {
            if (scopeType.getValue().equals(value)){
                return scopeType.getName();
            }
        }

        return null;
    }

    private Integer value;
    private String name;
}
